using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace uk.org.aspellclark.todolistppc
{
    /// <summary>
    ///   <name>FrmSettings</name>
    ///   <namespace>uk.org.aspellclark.todolistppc</namespace>
    ///   <version>1.0</version>
    ///   <author>Andy Aspell-Clark</author>
    ///   <copyright>2004 Andy Aspell-Clark</copyright>
    ///   <remarks>the family tree view</remarks>
    ///   <description>display a tree of people starting with the curretnly selected indiviual
    ///   </description>
    ///   <history>
    ///     <historyitem> 6 Dec 2004  1.0 ARA  Initial Version.</historyitem>
    ///   </history>
    /// </summary>
	public class FrmSettings : System.Windows.Forms.Form, IDisposable
	{
        private System.Windows.Forms.MainMenu m_mnuMain;
        private Microsoft.WindowsCE.Forms.InputPanel m_inputPanel;

        private System.Windows.Forms.Label m_lblFontSize;
        private System.Windows.Forms.ComboBox m_cmbFontSize;
        private System.Windows.Forms.Button m_btnSave;
        private System.Windows.Forms.Button m_btnCancel;
        private DialogResult m_drResult = DialogResult.Cancel;
        private System.Drawing.Font m_Font;


        #region Properties
        /// <summary>
        /// returns the result of the dialog (OK or Cancel) signifying which button was pressed to close the dialog
        /// </summary>
        public DialogResult GetDialogResult
        {
            get { return m_drResult; }
            set { m_drResult = value; }
        }

        #endregion



        /// <summary>
        /// 
        /// </summary>
        /// <param name="pFont"></param>
        /// <param name="piParentHeight"></param>
        public FrmSettings(System.Drawing.Font pFont, int piParentHeight)
		{
			//
			// Required for Windows Form Designer support
			//
            InitializeComponent();
            this.ControlBox = false;
            m_Font = pFont;
            this.Font = pFont;
            m_btnSave.Font = m_Font;
            m_btnCancel.Font = m_Font;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			base.Dispose( disposing );
        }

        private void m_btnCancel_Click(object sender, System.EventArgs e)
        {
            m_drResult = DialogResult.Cancel;
            this.Close();
        }//m_btnCancel_Click()

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.m_inputPanel = new Microsoft.WindowsCE.Forms.InputPanel();
            this.m_mnuMain = new System.Windows.Forms.MainMenu();
            this.m_lblFontSize = new System.Windows.Forms.Label();
            this.m_cmbFontSize = new System.Windows.Forms.ComboBox();
            this.m_btnSave = new System.Windows.Forms.Button();
            this.m_btnCancel = new System.Windows.Forms.Button();
            // 
            // m_lblFontSize
            // 
            this.m_lblFontSize.Location = new System.Drawing.Point(8, 16);
            this.m_lblFontSize.Size = new System.Drawing.Size(40, 16);
            this.m_lblFontSize.Text = "Font";
            // 
            // m_cmbFontSize
            // 
            this.m_cmbFontSize.Items.Add("Largest - 14");
            this.m_cmbFontSize.Items.Add("Large - 12");
            this.m_cmbFontSize.Items.Add("Medium - 10");
            this.m_cmbFontSize.Items.Add("Smaller - 8");
            this.m_cmbFontSize.Items.Add("Smallest - 6");
            this.m_cmbFontSize.Location = new System.Drawing.Point(48, 8);
            this.m_cmbFontSize.Size = new System.Drawing.Size(136, 21);
            // 
            // m_btnSave
            // 
            this.m_btnSave.Location = new System.Drawing.Point(32, 224);
            this.m_btnSave.Size = new System.Drawing.Size(50, 19);
            this.m_btnSave.Text = "Save";
            this.m_btnSave.Click += new System.EventHandler(this.m_btnSave_Click);
            // 
            // m_btnCancel
            // 
            this.m_btnCancel.Location = new System.Drawing.Point(152, 224);
            this.m_btnCancel.Size = new System.Drawing.Size(50, 19);
            this.m_btnCancel.Text = "Cancel";
            // 
            // FrmSettings
            // 
            this.Controls.Add(this.m_btnSave);
            this.Controls.Add(this.m_btnCancel);
            this.Controls.Add(this.m_cmbFontSize);
            this.Controls.Add(this.m_lblFontSize);
            this.Menu = this.m_mnuMain;
            this.Text = "Settings";
            this.Resize += new System.EventHandler(this.FrmSettings_Resize);
            this.Load += new System.EventHandler(this.FrmSettings_Load);

        }
		#endregion

        private void m_btnSave_Click(object sender, System.EventArgs e)
        {
        
        }

        private void FrmSettings_Load(object sender, System.EventArgs e)
        {
        
        }

        private void FrmSettings_Resize(object sender, System.EventArgs e)
        {
            this.Width = Screen.PrimaryScreen.Bounds.Width;
            this.Height = Screen.PrimaryScreen.Bounds.Height;
            if (Screen.PrimaryScreen.Bounds.Width > Screen.PrimaryScreen.Bounds.Height)
            {
                //Landscape();
            }
            else
            {
                //Portrait();
            }
        }
	}
}
